package com.ls.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 邀请函字段 表
 * </p>
 *
 * @author pengyu
 * @since 2024-10-12
 */
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
public class InviteField extends Model<InviteField> {
    private static final long serialVersionUID=1L;
    /**
     * 自增主键
     */
    @TableId(value = "field_id", type = IdType.AUTO)
    private Long fieldId;
    /**
     * 绑定邀请函id，来自invite表
     */
    private Long inviteId;
    /**
     * 字段对应类型
     */
    private Integer fieldType;
    /**
     * 字段类型名称
     */
    private String fieldName;
    /**
     * 字段排序
     */
    private Integer fieldIndex;
    /**
     * 字段名称
     */
    private String fieldLabel;
    /**
     * 字段值
     */
    private String fieldValue;
    /**
     * 字段图
     */
    private String fieldImg;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Override
    protected Serializable pkVal() {
        return this.fieldId;
    }
}
